package ClientController;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;

/*import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;*/

import Protocol.user.User;

public class ExcelHelper {
	public static ArrayList<User> getExcelUsers(String   filePath) {
		ArrayList<User>		userList = new ArrayList<User>();
			/*Workbook book;
			try {
				book = Workbook.getWorkbook(new FileInputStream(filePath));
				Sheet		sheet = book.getSheet(0);
				User		user = null;
				for(int i=1; i<sheet.getRows(); i++) {
					user = new User();
					user.setUser_type(sheet.getCell(2, i).getContents());
					user.setUser_password(sheet.getCell(1, i).getContents());
					user.setUser_number(sheet.getCell(0, i).getContents());
					userList.add(user);
				}
				System.out.println(userList);	
			} catch (BiffException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}*/
			
		return userList;
	}
}
